#region 版权信息
// ------------------------------------------------------------------------------
// Copyright: (c) 2029  耍嗨科技（成都）有限公司 - Amm
// 项目名称：$SOLUTION/$.PlayFun.SdkServices
// 文件名称：ResponseWrapper.cs
// 创建时间：2020021812:22
// 更改时间：2020021812:22
//  ------------------------------------------------------------------------------
#endregion


namespace Colorful.Furniture.Wrappers
{
    /// <summary>
    ///  api接口响应体
    /// </summary>
    public class StandardResponseWrapper
    {
        public StandardResponseWrapper(string message,bool success,int code)
        {
            Message = message;
            Success = success;
            Code = code;
        }

        public StandardResponseWrapper()
        {

        }

        /// <summary>
        ///   状态
        /// </summary>
        public bool Success { get; set; } = true;

        /// <summary>
        ///  状态码
        /// </summary>
        public int Code { get; set; } = 200;

        /// <summary>
        ///  消息
        /// </summary>
        public string Message { get; set; }
    }

    /// <summary>
    /// api接口响应体
    /// </summary>
    /// <typeparam name="T"></typeparam>
    public class StandardResponseWrapper<T> : StandardResponseWrapper
    {
        public StandardResponseWrapper(string message, bool success, int code) : base(message, success, code)
        {
        }

        public StandardResponseWrapper()
        {

        }

        /// <summary>
        ///  返回结果体
        /// </summary>
        public T Data { get; set; }

    }
}